#!/usr/bin/php
<?php

/* 
 * API docs and possible methods here - 
 * http://apidocs.posterous.com/
 */

require_once dirname(__FILE__) . '/PosterousClient.php';

$api = new PosterousClient('username', 'password');
$api->debug = true; // Comment this line in the live environment

// All Sites
//$sites = $api->get('/users/me/sites');

// Get a single site
//$site = $api->get('/users/me/sites/primary');
//$site = $api->get('/users/me/sites/< id, hostname or primary >');

// Create a site, get it and delete it
print_r($api->post('/users/me/sites', array('site[hostname]' => 'mytesting')));
print_r($api->get('/users/me/sites/mytesting'));
print_r($api->delete('/users/me/sites/mytesting'));

// Subscribers
//print_r($api->get('/users/me/sites/primary/subscribers'));

// Posts
//print_r($api->get('/users/me/sites/primary/posts/public'));

// Pages
//print_r($api->get('/users/me/sites/primary/pages'));